package algorithm_demo.string_api;

/**
 * JDK 11 String API测试
 * @author Api
 * @date 2023/6/12 22:33
 */
public class StringTest {
    public static void main(String[] args) {
        String a = "1234556";
        char c = a.charAt(0);
        System.out.println(c);

        String concat = a.concat("4444");
        System.out.println(concat);

        boolean b = a.contentEquals(new StringBuffer("12345564444"));
        System.out.println(b);

        String s = Integer.toHexString(28).toUpperCase();
        System.out.println(s);

        String s1 = Integer.toBinaryString(28);
        System.out.println(s1);

        int i = Integer.bitCount(1);
        System.out.println(i);
    }
}
